#include <standard.hlsli>
#include <WR2Parameters.hlsli>

VertexToPixel vs_main(VS_INPUT Input)
{
	VertexToPixel Output = (VertexToPixel)0;
	//float3 madResult = mad(float3(1, 2, 3), 4, 5);
	Output.pos = float4(mul(Input.Position, worldViewProj));
	Output.normal = normalize(mul(Input.Normal, (float3x3)world));
	Output.kBlend = Input.kblend;
	Output.kBlend.xyz = Output.kBlend.xyz;// +madResult;

	// Calculate the camera position.
	float4 v_CameraPosition = mul(Input.Position, world);
		v_CameraPosition = mul(v_CameraPosition, view);

	// Calculate linear fog.
	Output.foger =   saturate((fogEnd - v_CameraPosition.z) / (fogEnd - fogStart));
	Output.pos2.xyz = Input.Position.xyz;
	return Output;
};